﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using HF.Framework.DataClientDBAgent;
using HF.Framework.SqlDataContract;
namespace HF.WorkFlow.StatData
{
    public class WorkFlowStat
    {
        public static DataTable GetWorkTaskByUserStat()
        {
            string strSql = @"select o.userid,u.username,count(*) taskcount from HF_OperatorInstance  o 
                              inner join hf_user u on u.userid=o.userid
                              where o.operstatus=1 group by o.userid,u.username";
            try
            {
                SqlDataItem sqlItem = new SqlDataItem();
                sqlItem.CommandText = strSql;
                //sqlItem.AppendParameter("@topsize", topsize, typeof(int));
                ClientDBAgent agent = new ClientDBAgent();
                return agent.ExecuteDataTable(sqlItem);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

    }
}
